package com.hspedu.extends_.exercise;

/**
 * @Author Stringzhua
 * @Date 2024/3/1 20:48
 * description:继承的课堂练习1
 */
public class ExtendsExercise01 {
    public static void main(String[] args) {
        B b = new B();
    }
}

class A {
    A() {
        System.out.println("a");
    }

    A(String name) {
        System.out.println("a name");
    }
}

class B extends A {
    B() {
        this("abc");
        System.out.println("b");
    }

    B(String name) {//关键分析出默认的super()
        //默认有super()
        System.out.println("b name");
    }
}
